package com.pj.ca.common;

/**
 * 描述：
 *
 * @author pengjun
 * @date 2021/11/3 16:30
 */
public class LocalCaConstant {

    public enum KeyType {
        RSA("RSA", 1),
        SM2("SM2", 2),
        ECDSA("ECDSA", 3),
        DSA("DSA", 4);


        public String name;
        public Integer value;

        KeyType(String name, Integer value) {
            this.name = name;
            this.value = value;
        }

        public static KeyType forValue(Integer value) {
            KeyType[] values = KeyType.values();
            for (KeyType v : values) {
                if (v.value.equals(value)) {
                    return v;
                }
            }
            return null;
        }

    }
}
